package com.tengju.bff.interfaces.covercharge.constant;

public enum PersonalGiveStatusWebEnum {
    PAY_SUCCESS(0, "打款成功"),
    PAY_FAILURE(1, "打款失败");

    private Integer code;
    private String desc;

    PersonalGiveStatusWebEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

    public static PersonalGiveStatusWebEnum getStatusDesc (Integer code){
        for(PersonalGiveStatusWebEnum statusWebEnum : (PersonalGiveStatusWebEnum.values())){
            if(statusWebEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return statusWebEnum;
            }
        }
        return null;
    }
}
